import { goods } from "../api/index";
export default {
    methods: {
        // 传入 id,  获取指定 id 的商品列表数据
        async get_classifys_data(id) {
            let res = await goods({
                classify_id: id,
                // project_id: 4, //当前项目 id 是 4, 可固定
            });
            return res.data.result.rows.map((el) => {
                return {
                    name: el.name,
                    pics: el.s_goods_photos.map(el => el.path),
                    sale_price: el.sale_price,
                    price: el.price,
                    desc: el.desc,
                    rich_text: el.rich_text,
                    id: el.id
                };
            })
        },
    }
}